package com.windoent.yugioh.adapter.brvah;

import androidx.annotation.NonNull;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.windoent.yugioh.R;
import com.windoent.yugioh.bean.GoodsAddressListBean;
import com.windoent.yugioh.utils.BaseMethod;

/**
 * author : robert
 * date   : 2021/5/6 15:26
 * desc   :
 */
public class AddressAdapter extends BaseQuickAdapter<GoodsAddressListBean.DataBean.ResBean, BaseViewHolder> {

    public AddressAdapter() {
        super(R.layout.item_list_address, null);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder helper, GoodsAddressListBean.DataBean.ResBean item) {
        helper.setText(R.id.tv_name, BaseMethod.notNullDefaultValueNull(item.getName()))
                .setText(R.id.tv_phone, BaseMethod.notNullDefaultValueNull(item.getTelephone()))
                .setText(R.id.tv_content, BaseMethod.notNullDefaultValueNull(item.getAddress()))
        ;
    }
}